package com.xmkj.jijidriver.mine.activity;

import android.view.View;
import android.widget.TextView;

import com.common.cons.Constans;
import com.common.mvp.BaseMvpActivity;
import com.common.mvp.BasePresenter;
import com.common.retrofit.entity.bean.UserDetailsBean;
import com.common.utils.EmptyUtils;
import com.common.widget.navigation.WidgetButton;
import com.xmkj.jijidriver.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by chen on 2018/3/31.
 */

public class MyWalletActivity extends BaseMvpActivity {
    @BindView(R.id.tv_count)
    TextView mTvCount;
    @BindView(R.id.tv_chongzhi)
    TextView mTvChongzhi;
    @BindView(R.id.tv_tixian)
    TextView mTvTixian;
    UserDetailsBean info;

    @Override
    protected BasePresenter createPresenterInstance() {
        return null;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_mywallet;
    }

    @Override
    protected void onViewCreated() {
        setRightNavigationText();
        info = (UserDetailsBean) getIntent().getSerializableExtra(Constans.INFOBEAN);
    }
    private void setRightNavigationText() {
        m_navigationBar.setVisibility(View.VISIBLE);
        WidgetButton widgetButton = new WidgetButton(this, R.string.user_car_details);
        widgetButton.getTextView().setTextColor(getResources().getColor(R.color.black));
        widgetButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                gotoUpdateUser();
                gotoActivity(UserCarDetailsActivity.class);
            }
        });
        m_navigationBar.setRightMenu(widgetButton);
    }

    @Override
    protected void doLogicFunc() {
        if(EmptyUtils.isNotEmpty(info)){
            mTvCount.setText(info.account);
        }
    }

    @Override
    protected void setNavigation() {
        setNavigationBack("我的钱包");
    }

 
    @Override
    public void bindKnife() {
        ButterKnife.bind(this);
    }
}
